Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.rdl
Class Message_Simple

    java.lang.Object
      rdlc.rdl.Declaration_Named
          rdlc.rdl.Message_Simple

All Implemented Interfaces:
  Declaration, Expression, Message

     class Message_Simple

extends Declaration_Named
implements Message

Standard simple message type. Specifies nothing more than the width of the message in bits.

Version:
  $Revision: 1.11 $
Author:
  Greg Gibeling

Nested Class Summary

Nested classes/interfaces inherited from interface rdlc.rdl.Expression
`Expression.Phase`

Field Summary
`protected int` | `width` The width of this message.

Fields inherited from class rdlc.rdl.Declaration_Named
`iName, namespace, rawStaticID`

Constructor Summary
`Message_Simple(int _width, Log _errorLog)` Full constructor for a message.
`Message_Simple(Namespace _namespace)` Base constructor for an unnamed message in a catalog (namespace).

Method Summary
`Catalog<java.lang.String,Message>` | `getFields()` Simple accessor.
`java.lang.String` | `getLambdaName()` Simple accessor.
`java.util.Hashtable<java.lang.String,java.lang.Integer>` | `getName2Tag()` Simple accessor.
`java.util.Hashtable<java.lang.Integer,java.lang.String>` | `getTag2Name()` Simple accessor.
`int` | `getTagWidth()` Simple accessor.
`int` | `getWidth()` Simple accessor.
`boolean` | `isVariableWidth()` Simple accessor.
`java.lang.String` | `toString()` Simple accessor.
`boolean` | `typeMatch(Expression e)` Will only match against another simple message of the same width.

Methods inherited from class rdlc.rdl.Declaration_Named
`getBase, getIdentifier, getNamedBase, getRawStaticID, getRequirements, getType, resolve, setNamespace, setRawStaticID`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface rdlc.rdl.Declaration
`getBase, getIdentifier, getNamedBase, getType, setRawStaticID`

Methods inherited from interface rdlc.rdl.Expression
`getRequirements, resolve, setNamespace`

Field Detail

### width

    protected int width

  The width of this message.

Constructor Detail

### Message_Simple

    public Message_Simple(Namespace _namespace)

  Base constructor for an unnamed message in a catalog (namespace). This is used as part of error recovery: it is called to create a default "bit[1]" message any time the real message properties cannot be determined during parsing.

  Parameters:
    `_namespace` - The namespace in which to create this unnamed message.

### Message_Simple

    public Message_Simple(int _width,
                          Log _errorLog)

  Full constructor for a message. Takes the given width and stores it. Note that it will also check for errors such as invalid message width.

  Parameters:
    `_width` - The bitwidth of this message.
    `_errorLog` - A list of all the errors to be reported.

Method Detail

### toString

    public java.lang.String toString()

  Simple accessor.

  Overrides:
    `toString` in class `Declaration_Named`
  Returns:
    A human readable representation of this map for debugging.

### getWidth

    public int getWidth()

  Description copied from interface: `Message`
  Simple accessor.

  Specified by:
    `getWidth` in interface `Message`
  Returns:
    The maximum total (including the tag) bitwidth of this message type.
  See Also:
    `Message.getWidth()`

### getTagWidth

    public int getTagWidth()

  Description copied from interface: `Message`
  Simple accessor.

  Specified by:
    `getTagWidth` in interface `Message`
  Returns:
    `0` since simple messages are untagged.
  See Also:
    `Message.getTagWidth()`

### getName2Tag

    public java.util.Hashtable<java.lang.String,java.lang.Integer> getName2Tag()

  Description copied from interface: `Message`
  Simple accessor.

  Specified by:
    `getName2Tag` in interface `Message`
  Returns:
    `null` since simple messages have no fields.
  See Also:
    `Message.getName2Tag()`

### getTag2Name

    public java.util.Hashtable<java.lang.Integer,java.lang.String> getTag2Name()

  Description copied from interface: `Message`
  Simple accessor.

  Specified by:
    `getTag2Name` in interface `Message`
  Returns:
    `null` since simple messages have no fields.
  See Also:
    `Message.getTag2Name()`

### getFields

    public Catalog<java.lang.String,Message> getFields()

  Description copied from interface: `Message`
  Simple accessor.

  Specified by:
    `getFields` in interface `Message`
  Returns:
    `null` since simple messages have no fields.
  See Also:
    `Message.getFields()`

### isVariableWidth

    public boolean isVariableWidth()

  Description copied from interface: `Message`
  Simple accessor.

  Specified by:
    `isVariableWidth` in interface `Message`
  Returns:
    `false` since a simple message has a fixed bitwidth.
  See Also:
    `Message.isVariableWidth()`

### typeMatch

    public boolean typeMatch(Expression e)

  Will only match against another simple message of the same width. This should only be called when unnamed messages are used directly in unit ports, structs or unions since RDL has a named type system.

  Specified by:
    `typeMatch` in interface `Expression`
  Parameters:
    `e` - The expression to check this one against.
  Returns:
    `true` if these two expressions match in type.
  See Also:
    `Expression.typeMatch(Expression)`

### getLambdaName

    public java.lang.String getLambdaName()

  Description copied from interface: `Declaration`
  Simple accessor.

  Specified by:
    `getLambdaName` in interface `Declaration`
  Returns:
    A simple and boring type name which includes the bitwidth.
  See Also:
    `Declaration.getLambdaName()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD